<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>    
<c:url var="postLoginUrl" value="/j_spring_security_check" />
<html>
<head>
<link href="resources/bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="resources/css/screen-theme.css" rel="stylesheet">
<link href="resources/css/signin.css" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href='http://fonts.googleapis.com/css?family=Vollkorn:700' rel='stylesheet' type='text/css'>	
<title>Popup | connexion</title>
</head>
<body>
	<c:if test="${param.failed == true }">
		<div>Echec de connexion. Essayez à nouveau.</div>
	</c:if>
	 <div class="container">
	 <div id="connHead">
	 	<img src="resources/img/logo.jpg" alt=""/>
	 </div>
	 	<h1>Connectez-vous</h1>	
	 	
		<c:if test="${param.error != null}">
			<div id="ErrorLogin" class="alert alert-danger">
			Failed to login.
			<c:if test="${SPRING_SECURITY_LAST_EXCEPTION != null}">
				Reason: <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.
				message}" />
			</c:if>
			</div>
		</c:if>


		<form class="form-signin" action="${postLoginUrl}" method="post">
			Email:<input type="email" name="j_username" class="form-control" placeholder="Email" required autofocus/><br/>
			Mot de passe: <input type="password" name="j_password" class="form-control" placeholder="Mot de passe" required /><br/>
			<div class="checkbox">
				<input id="checkremember" type="checkbox" name="_spring_security_remember_me" /><label for="checkremember">Se souvenir de moi</label><br/>
			</div>
			<input type="submit" value="Log in" class="btn btn-lg btn-primary btn-block"/>
			<a href="./public/inscription"><button type="button" class="btn btn-lg btn-primary btn-block">S'enregistrer</button></a>
		</form>
	
		
	</div>
</body>
</html>